import request from '@/utils/request'

export default {

    //根据id来查询章节小节信息
    getChapterVideoById(courseId){
        return request({
            url: `/eduservice/educhapter/getChapterVideoById/${courseId}`,
            method: 'get',
        })
    },
    //添加章节
    addChapter(eduChapter){
        return request({
            url: `/eduservice/educhapter/addChapter`,
            method: 'post',
            data:eduChapter
        })
    },
    //删除章节
    deleteChapterById(id){
        return request({
            url: `/eduservice/educhapter/deleteChapterById/${id}`,
            method: 'delete',
        })
    },
    // 根据id获取章节信息
    getChapterById(id){
        return request({
            url: `/eduservice/educhapter/getChapterById/${id}`,
            method: 'get',
        })
    },
    // 修改章节信息
    updateChapter(eduChapter){
        return request({
            url: `/eduservice/educhapter/updateChapter`,
            method: 'post',
            data:eduChapter
        })
    },
}